package com.asking.pojo;

import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import javax.persistence.Id;
import java.util.Date;

@Document(indexName = "answer", type = "answer", shards = 5, replicas = 1)
public class EsAnswer {
    @Id
    private Integer id;
    @Field(type = FieldType.Keyword)
    private String pid;
    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String text;
    @Field(type = FieldType.Keyword)
    private Integer support;
    @Field(type = FieldType.Keyword)
    private Integer uid;
    @Field(type = FieldType.Keyword)
    private Date time;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public Integer getSupport() {
        return support;
    }

    public void setSupport(Integer support) {
        this.support = support;
    }

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }
}
